Release 10.1A: OpenEdge Development:
Progress 4GL Handbook
Using and setting object attributes
Each different type of object has its own attributes, which represent some aspect or capability of the object that you can set and query. Attributes fall into several basic categories:
- Geometry — The size and location of the object in a frame or window.
- Appearance — The color and font, or whether the object has optional features such as a scrollbar, or whether it is visible or not, for example.
- Data management — The initial value and whether the value is undone as part of a transaction, for example.
- Relationships to other objects — The parent or sibling, for example.
- Identifying characteristics of an object — Its name, for example.
You can specify initial values for many object attributes when you define the object. The 4GL supports a large number of keywords that represent these various attributes. In some cases, a single keyword represents the attribute, such as
SCROLLBAR-VERTICALfor an editor. In other cases, the attribute keyword takes one or more arguments, in the form of other values that follow the keyword in theDEFINEstatement, such asROW 5.You can also query most attribute values from within the procedure that defines the object. To retrieve the value of an attribute, you use the form:
Do not use spaces on either side of the colon between the
object-nameand theattribute-name. Each attribute has an appropriate data type, such asDECIMALfor theROWattribute orLOGICALfor theHIDDENattribute. You can use an attribute value anywhere in an expression or assignment where you would use any other value. If the attribute reference is not unambiguous, you can provide context for it in the reference by qualifying it with the name of the frame, menu, or submenu it appears in. The default is the most recently defined container whose description includes the object.For example, this attribute reference checks whether the
Firstbutton is hidden:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |